package com.example.repository;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.entity.AirQualitySensor;
import com.example.entity.CoSensor;
import com.example.entity.Params;
import com.example.entity.TemperatureHumiditySensor;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Mapper
public interface CoSensorMapper extends BaseMapper<CoSensor> {

    List<CoSensor> getSensorData();

    @MapKey("time_group")
    List<Map<String, Object>> initLine(@Param("params")Params params);

    @MapKey("date")
    List<Map<String, Object>> initLineForAdmin(@Param("params") Params params);


}
